package com.tutk.ipcam;

import android.app.Fragment;
import android.graphics.Bitmap;

import com.tutk.IOTC.AVIOCTRLDEFs;

import java.util.ArrayList;

/**
 * Created by sabonis on 3/19/15.
 * With MBPR
 */
public interface IpCamera {

    Fragment getView();

    Bitmap getSnapshot();

    void record(int sec, String path, RecordingCallback lis);

    void disconnect();

    void listen();

    void mute();

    void speak();
    void reInit(String name, final String uid, String password);

    void setOnStreamInfoUpdate(OnStreamInfoUpdate onStreamInfoUpdate);

    void reconnect();

    void setPassword(String oldPassword, String newPassword, AsyncCallback<Integer> cb);

    void getVideoQuality(AsyncCallback<Integer> cb);

    void setVideoQuality(int videoQuality);

    void getVideoMode(AsyncCallback<Integer> cb);

    void getWifiList(AsyncCallback<ArrayList<AVIOCTRLDEFs.SWifiAp>> cb);
    void setWifi(AVIOCTRLDEFs.SWifiAp sWifiAp, String password, AsyncCallback<Integer> cb);
    void stopShow();

    void setVideoMode(int videoMode);

    interface OnStreamInfoUpdate {
        void onFrameRateUpdate(String frameRate);

        void onFrameResolutionUpdate(String resolution);

        void onCameraConnected();

        void onCameraStatus(String did, int status);
    }

    interface RecordingCallback {
        void onRecordStart();

        void onRecordFinished();
    }

    interface AsyncCallback<T> {
        void onSuccess(T t);

        void onFailed();
    }


    interface VideoQuality {

    }
}
